﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Unis.FMS.Platform.Order.Domain {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "doc_dpt_task_additions", DisableSyncStructure = true)]
	public partial class DocDptTaskAdditions {

		[JsonProperty, Column(Name = "id", DbType = "int", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 实际发生时间
		/// </summary>
		[JsonProperty, Column(Name = "actual_create_time", DbType = "datetime")]
		public DateTime ActualCreateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 实际发生时间
		/// </summary>
		[JsonProperty, Column(Name = "actual_update_time", DbType = "datetime")]
		public DateTime ActualUpdateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 非Linehaul时有值。
		/// </summary>
		[JsonProperty, Column(Name = "business_clinet", StringLength = 50, IsNullable = false)]
		public string BusinessClinet { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_user", StringLength = 50, IsNullable = false)]
		public string CreateUser { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "created_by", DbType = "int")]
		public int CreatedBy { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "created_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime CreatedTime { get; set; }

		/// <summary>
		/// pickup的Request Pickup date，Delivery的desire Delivery date，Service 的 Service date
		/// </summary>
		[JsonProperty, Column(Name = "desire_service_date", DbType = "datetime")]
		public DateTime DesireServiceDate { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// dst polygon
		/// </summary>
		[JsonProperty, Column(Name = "dst_polygon_id", StringLength = 50, IsNullable = false)]
		public string DstPolygonId { get; set; }

		/// <summary>
		/// dst terminal
		/// </summary>
		[JsonProperty, Column(Name = "dst_terminal", StringLength = 50, IsNullable = false)]
		public string DstTerminal { get; set; }

		/// <summary>
		/// 异常数据
		/// </summary>
		[JsonProperty, Column(Name = "exception_data", StringLength = 1000, IsNullable = false)]
		public string ExceptionData { get; set; }

		/// <summary>
		/// 异常原因
		/// </summary>
		[JsonProperty, Column(Name = "exception_reason", StringLength = 50, IsNullable = false)]
		public string ExceptionReason { get; set; }

		/// <summary>
		/// 地址1
		/// </summary>
		[JsonProperty, Column(Name = "from_address1", IsNullable = false)]
		public string FromAddress1 { get; set; }

		/// <summary>
		/// 地址2
		/// </summary>
		[JsonProperty, Column(Name = "from_address2", IsNullable = false)]
		public string FromAddress2 { get; set; }

		/// <summary>
		/// city
		/// </summary>
		[JsonProperty, Column(Name = "from_city", StringLength = 50, IsNullable = false)]
		public string FromCity { get; set; }

		/// <summary>
		/// 发件人邮箱
		/// </summary>
		[JsonProperty, Column(Name = "from_email", StringLength = 50, IsNullable = false)]
		public string FromEmail { get; set; }

		/// <summary>
		/// 出发地维度
		/// </summary>
		[JsonProperty, Column(Name = "from_lat", DbType = "decimal(10,7)")]
		public decimal FromLat { get; set; } = 0.0000000M;

		/// <summary>
		/// 出发地经度
		/// </summary>
		[JsonProperty, Column(Name = "from_lng", DbType = "decimal(10,7)")]
		public decimal FromLng { get; set; } = 0.0000000M;

		/// <summary>
		/// from location id
		/// </summary>
		[JsonProperty, Column(Name = "from_loaction_id", StringLength = 50, IsNullable = false)]
		public string FromLoactionId { get; set; }

		/// <summary>
		/// 发件人姓名
		/// </summary>
		[JsonProperty, Column(Name = "from_name", StringLength = 50, IsNullable = false)]
		public string FromName { get; set; }

		/// <summary>
		/// 发件人联系方式
		/// </summary>
		[JsonProperty, Column(Name = "from_phone", StringLength = 50, IsNullable = false)]
		public string FromPhone { get; set; }

		/// <summary>
		/// state
		/// </summary>
		[JsonProperty, Column(Name = "from_state", StringLength = 50, IsNullable = false)]
		public string FromState { get; set; }

		/// <summary>
		/// zipcode
		/// </summary>
		[JsonProperty, Column(Name = "from_zipcode", StringLength = 50, IsNullable = false)]
		public string FromZipcode { get; set; }

		/// <summary>
		/// 是否删除（0.正常 1.删除）;0.正常 1.删除
		/// </summary>
		[JsonProperty, Column(Name = "is_del", DbType = "int")]
		public int IsDel { get; set; } = 0;

		/// <summary>
		/// org polygon
		/// </summary>
		[JsonProperty, Column(Name = "org_polygon_id", StringLength = 50, IsNullable = false)]
		public string OrgPolygonId { get; set; }

		/// <summary>
		/// org terminal
		/// </summary>
		[JsonProperty, Column(Name = "org_terminal", StringLength = 50, IsNullable = false)]
		public string OrgTerminal { get; set; }

		/// <summary>
		/// 包裹数
		/// </summary>
		[JsonProperty, Column(Name = "packages", DbType = "int")]
		public int Packages { get; set; } = 0;

		/// <summary>
		/// Polygon station-name 拼接
		/// </summary>
		[JsonProperty, Column(Name = "polygon_code", StringLength = 50, IsNullable = false)]
		public string PolygonCode { get; set; }

		/// <summary>
		/// task no
		/// </summary>
		[JsonProperty, Column(Name = "task_no", DbType = "bigint")]
		public long TaskNo { get; set; } = 0;

		/// <summary>
		/// 地址1
		/// </summary>
		[JsonProperty, Column(Name = "to_address1", IsNullable = false)]
		public string ToAddress1 { get; set; }

		/// <summary>
		/// 地址2
		/// </summary>
		[JsonProperty, Column(Name = "to_address2", IsNullable = false)]
		public string ToAddress2 { get; set; }

		/// <summary>
		/// city
		/// </summary>
		[JsonProperty, Column(Name = "to_city", StringLength = 50, IsNullable = false)]
		public string ToCity { get; set; }

		/// <summary>
		/// 收件人邮箱
		/// </summary>
		[JsonProperty, Column(Name = "to_email", StringLength = 50, IsNullable = false)]
		public string ToEmail { get; set; }

		/// <summary>
		/// 到达地址维度
		/// </summary>
		[JsonProperty, Column(Name = "to_lat", DbType = "decimal(10,7)")]
		public decimal ToLat { get; set; } = 0.0000000M;

		/// <summary>
		/// 到达地址经度
		/// </summary>
		[JsonProperty, Column(Name = "to_lng", DbType = "decimal(10,7)")]
		public decimal ToLng { get; set; } = 0.0000000M;

		/// <summary>
		/// to lcation id
		/// </summary>
		[JsonProperty, Column(Name = "to_location_id", StringLength = 50, IsNullable = false)]
		public string ToLocationId { get; set; }

		/// <summary>
		/// 收件人姓名
		/// </summary>
		[JsonProperty, Column(Name = "to_name", StringLength = 50, IsNullable = false)]
		public string ToName { get; set; }

		/// <summary>
		/// 收件人联系方式
		/// </summary>
		[JsonProperty, Column(Name = "to_phone", StringLength = 50, IsNullable = false)]
		public string ToPhone { get; set; }

		/// <summary>
		/// state
		/// </summary>
		[JsonProperty, Column(Name = "to_state", StringLength = 50, IsNullable = false)]
		public string ToState { get; set; }

		/// <summary>
		/// to_zipcode
		/// </summary>
		[JsonProperty, Column(Name = "to_zipcode", StringLength = 50, IsNullable = false)]
		public string ToZipcode { get; set; }

		/// <summary>
		/// 更新人
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "int")]
		public int UpdateBy { get; set; } = 0;

		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(Name = "update_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime UpdateTime { get; set; }

		/// <summary>
		/// 修改人
		/// </summary>
		[JsonProperty, Column(Name = "update_user", StringLength = 50, IsNullable = false)]
		public string UpdateUser { get; set; }

		/// <summary>
		/// 总体积
		/// </summary>
		[JsonProperty, Column(Name = "volume", DbType = "decimal(11,2)")]
		public decimal Volume { get; set; } = 0.00M;

		/// <summary>
		/// 重量
		/// </summary>
		[JsonProperty, Column(Name = "weight", DbType = "decimal(11,2)")]
		public decimal Weight { get; set; } = 0.00M;

	}

}
